import {Injectable} from '@angular/core';
import {HttpService} from '../../../lib/service/http.service';
import {adSystemApiUrl} from '../../../../config/api';
import {Headers, RequestOptions} from '@angular/http';
/**
 * Created by fifths on 17-8-31.
 */


@Injectable()
export class AddCateogryService {

  constructor(private httpService: HttpService) {

  }

  // 类目
  delCategory(id: number) {
    const url = `${adSystemApiUrl}/v1/admin/goods_category/del/${id}`;
    const headers = new Headers({'Content-Type': 'application/json'});
    const options = new RequestOptions({headers: headers});
    const body = JSON.stringify({});
    return this.httpService.httpPostAuth(url, body, options).map(rs => rs);
  }
}

